#ifndef TABWIDGET_H
#define TABWIDGET_H


#include <CampaignItem.h>


#include <QTabWidget>
#include <QTreeView>



class TabWidget : public QTabWidget
{
    Q_OBJECT
public:
    explicit TabWidget(QWidget *parent = 0);

    QTreeView* tabView(int index = -1);

public slots:

    void onNew(CampaignItem* item = 0);
    void onOpen();
    void onSave(int index = -1);
    void onSaveAs(int index = -1);
    void onClose(int index = -1);

    void onAddItem(int index = -1);
    void onAddGroup(int index = -1);
    void onAddReference(int index = -1);

    void onRefresh();
    void onRelease();

    void onBeginRename(int index = -1);
    void onEndRename();


signals:

    void sigEditingFinished(int index);


protected:


    int edit_index;



};

#endif // TABWIDGET_H
